#ifndef ABSTRACTDATABASECLIENT_H
#define ABSTRACTDATABASECLIENT_H

#include <QObject>
#include <QVariantList>

class ModelListResult;
class ModelResult;
class ValueListResult;
class ValueResult;

class AbstractDatabaseClient : public QObject
{
    Q_OBJECT
public:
    explicit AbstractDatabaseClient(QObject *parent = 0);
    virtual ValueResult* connectToDatabase() = 0;
    virtual ValueResult* disconnectFromDatabase() = 0;
    virtual ModelResult* selectModel (const QString& queryText, const QVariantList& parameters) = 0;
    virtual ModelResult* selectModel (const QString& queryText, const QVariant& parameter = QVariant());
    virtual ValueResult* selectExists (const QString& queryText, const QVariantList& parameters) = 0;
    virtual ValueResult* selectExists (const QString& queryText, const QVariant& parameter);
    virtual ValueResult* insertData (const QString& queryText, const QVariantList& parameters) = 0;
    virtual ValueResult* insertData (const QString& queryText, const QVariant& parameter = QVariant());
    virtual ValueResult* updateData (const QString& queryText, const QVariantList& parameters) = 0;
    virtual ValueResult* removeData (const QString& queryText, const QVariantList& parameters) = 0;
};

#endif // ABSTRACTDATABASECLIENT_H
